//
//$Id: combgen.h 695 2011-04-07 19:15:27Z andrew.tsyganov $
#pragma once

#include "sets.h"

class CombGen
{
protected:
    std::vector<int> p_;
    int m_, m_finish_, n_, x_, y_, z_;

    void inittwiddle();
    bool twiddle();
public:
    void init(u_t const m, u_t const n, std::vector<char>& vc);
    bool next(std::vector<char>& vc);

    void init(u_t const m, u_t const n, Subset& s);
    bool next(Subset& s);

    void init(u_t const start, u_t const finish, u_t const n, Subset& s);
    bool next_To(Subset& s);
    bool next_Downto(Subset& s);
};

//EOF!

